/**
 * This file is part of Sonedyan.
 * 
 * Sonedyan is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public
 * License as published by the Free Software Foundation;
 * either version 3 of the License, or (at your option) any
 * later version.
 *
 * Sonedyan is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied
 * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
 * PURPOSE.  See the GNU General Public License for more
 * details.
 *
 * You should have received a copy of the GNU General Public
 * License along with Octave; see the file COPYING.  If not
 * see <http://www.gnu.org/licenses/>.
 * 
 * Copyright (C) 2009-2012 Jimmy Dubuisson <jimmy.dubuisson@gmail.com>
 */

package org.unige.mpej.eckmann.sonedyan.bean;

import java.util.Date;

/**
 * Sonedyan edge
 */
public class Edge 
{
	private String fromActorId;
	private String toActorId;
	
	// NB: linkId is not necessarily unique
	// for Enron, it represents a unique email ID
	// for FNS, it represents a project ID which can link different persons
	private String linkId;

	// validity time interval
	// NB: if end date is specified, the association is assumed to be ponctual 
	private Date startDate;
	private Date endDate;
	
	/**
	 * default constructor
	 */
	public Edge(){}
	
	public String getFromActorId()
	{
		return fromActorId;
	}

	public void setFromActorId(String fromActorId)
	{
		this.fromActorId = fromActorId;
	}

	public String getToActorId()
	{
		return toActorId;
	}

	public void setToActorId(String toActorId)
	{
		this.toActorId = toActorId;
	}
	
	public String getLinkId()
	{
		return linkId;
	}

	public void setLinkId(String linkId)
	{
		this.linkId = linkId;
	}
	
	public Date getStartDate()
	{
		return startDate;
	}

	public void setStartDate(Date startDate)
	{
		this.startDate = startDate;
	}

	public Date EndDate()
	{
		return endDate;
	}

	public void setEndDate(Date endDate)
	{
		this.endDate = endDate;
	}
	
	public Date getEndDate()
	{
		return endDate;
	}
	
	/**
	 * toString method to be used for graph export
	 * 
	 * linkId/fromActorId/toActorId
	 */
	public String toString()
	{
		return this.linkId + "/" + this.fromActorId + "/" + this.toActorId;
	}
	
}
